<form action="index" method="POST" id="Listxml_Recordtype_Add" enctype="multipart/form-data" autocomplete="off">
<table width='100%'  border='0' cellspacing='0' cellpadding='0' class="table_title">
	<!--tao tac hidden!-->
	<tr>
		<td style="padding-left:7px;text-align:left;">
			<?php echo $this->formHidden("hdn_deleted_exist_file_id_list","",null); ?>
			<?php echo $this->formHidden("hdn_deleted_new_file_id_list","",null); ?>
			<?php echo $this->formHidden("hdn_xml_tag_list","",null); ?>
			<?php echo $this->formHidden("hdn_xml_value_list","",null); ?>
			<?php echo $this->formHidden("hdn_XmlTagValueList","",null); ?>
			<!--Bien hdn_deleted_exist_file_id_list dung de ...-->	
			<?php echo $this->formHidden("hdn_deleted_exist_file_id_list","",null); ?>	
			<?php echo $this->formHidden("hdn_object_id","",null); ?>			
			<?php echo $this->formHidden("hdn_list_id","",null); ?>			
			<?php echo $this->formHidden("hdn_department_list","",null); ?>			
		</td>
	</tr>
</table>
<?php 
	//Cac mang goi tu Controller
	$arrConst = $this->arrConst;
	$arrResult = $this->arrResult; 
	$arrGroupRecord = $this->arrGroupRecord;
?>
<div style="height:3px;"></div>
<div id ="contentXml" >
	<div id="header_conten" style="height: 15px;padding-bottom:15px;">
		<h1 class="large_label" style="padding-left:7px;text-align:left;"><?=$this->bodyTitle;?> 
			<div style="text-align:right; float:right;">
				<a  class="small_link" onClick = "btn_save_recordtype(document.getElementsByName('hdn_xml_tag_list'),document.getElementsByName('hdn_xml_value_list'),'');"><?=$arrConst['_GHI'] ?>&nbsp;|</a> 
				<a  class="small_link"  onclick="actionUrl('../index/');">&nbsp;<?=$arrConst['_QUAY_LAI'] ?>&nbsp;</a>
			</div>
		</h1>
	</div>
<!--Form nhap TTHC !-->
	<div id="body_conten1">
		<div>
			<label>Nhóm loại TTHC<span class="requiein">*</span></label>
			<select  id="C_GROUP_RECORD" name="C_GROUP_RECORD"  option = "false"  style="width:25%;" class="textbox"  message="<?php echo "Phải xác định lĩnh vực";?>" >
				<option id="" name = "" value="">-- Chọn nhóm loại TTHC --</option>
				<?php echo Efy_Library::_generateSelectOption($arrGroupRecord,'C_CODE','C_CODE','C_NAME',"");?>
			</select>
		</div>
		<div>
			<label >Mã TTHC<span class="requiein">*</span></label>
			<input style="width:33%" class="textbox" type="text"  id ="C_CODE" name="C_CODE" option = "false"  value="" xml_data="false" column_name="C_CODE" message="<?php echo "Phải xác định mã thủ tục hành chính!";?>">			
		</div>
		<div>
			<label>Tên TTHC<span class="requiein">*</span></label>
			<input style="width:65%" class="textbox" type="text"  id ="C_NAME" name="C_NAME" option = "false"  value="" xml_data="false" column_name="C_NAME" message="<?php echo "Phải xác định tên thủ tục hành chính!";?>">
		</div>
		<div>
			<label><?=$arrConst['_THU_TU'] ?><span class="requiein">*</span></label>
			<input style="width:15%" id ="C_ORDER" name="C_ORDER" class="textbox" type="text"  option = "false"  value="<?=$this->iOrder?>"  message="<?php echo "Phải xác định thứ tự!";?>"    onchange="IsNumeric(this);">			
			&nbsp; &nbsp; <input id ="C_STATUS" name="C_STATUS" class="textbox" type="checkbox"  checked> <span >Hoạt động </span>				
		</div>			
<!-- SO NGAY THU LY HS THEO QUI DINH VA CAC GIAI DOAN -->		
		<div style="margin:0px 0px 5px 0px;">
			<label><b>Thời gian thụ lý hồ sơ</b></label>
			<input style="width:10%" class="textbox" type="text"  id ="C_PROCESS_NUMBER_DATE" name="C_PROCESS_NUMBER_DATE" optional = "true"  value="<?=$arrResult['C_PROCESS_NUMBER_DATE']?>"  onchange="IsNumeric(this);">
			<span>&nbsp;ngày&nbsp;</span>
			<input style="width:10%" class="textbox" type="text"  id ="C_PROCESS_NUMBER_TIME" name="C_PROCESS_NUMBER_TIME" optional = "true"  value="<?=$arrResult['C_PROCESS_NUMBER_TIME']?>"  onchange="Ishours(this);">
			<span>&nbsp;giờ</span>	
		</div>
		<div style="width:98%; margin:10px 10px 10xp 10px;">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center" class="list-table-data" id="table1">
				<col width="4%"><col width="8%"><col width="53%"><col width="20%">
				<tr  class="header">
					<td align="center" class="title">#</td>
					<td align="center" class="title">Thứ tự xử lý</td>
					<td align="center" class="title">Phòng ban</td>
					<td align="center" class="title">Thời gian giải quyết</td>
				</tr>	
			<?php
			$arr_all_unit = Efy_Function_RecordFunctions::ecsGetAllDepartment();
			$sCurrentStyleName = "round_row";
			for($index = 0;$index < sizeof($arr_all_unit);$index++){ 
					if ($sCurrentStyleName == "odd_row"){
						$sCurrentStyleName = "round_row";
					}else{
						$sCurrentStyleName = "odd_row";					
					} ?>				
				<tr class="<?=$sCurrentStyleName?>"  onclick="check_color_recordtype(this,document.getElementById('<?=$arr_all_unit[$index]['id'] ?>'))" >
					<td align="center" >
						<input id ="<?=$arr_all_unit[$index]['id'] ?>" name="<?=$arr_all_unit[$index]['id'] ?>" class="textbox" type="checkbox" > 
					</td>
					<td align="center">
						<input style="width:50%" class="textbox" type="text"  id ="STT_<?=$arr_all_unit[$index]['id'] ?>" name="STT_<?=$arr_all_unit[$index]['id'] ?>" optional = "true"  value="" onchange="IsNumeric(this);">
					</td>
					<td >	
						&nbsp;<?=$arr_all_unit[$index]['name'] ?>&nbsp;
					</td>	
					<td align="center">
						&nbsp; &nbsp; &nbsp;
						<input style="width:20%" class="textbox" type="text"  id ="DATE_<?=$arr_all_unit[$index]['id'] ?>" name="DATE_<?=$arr_all_unit[$index]['id']  ?>" optional = "true"  value="" onchange="IsNumeric(this);"> Ngày
						<input style="width:25%" class="textbox" type="text"  id ="TIME_<?=$arr_all_unit[$index]['id'] ?>" name="TIME_<?=$arr_all_unit[$index]['id']  ?>" optional = "true" value="" onchange="Ishours(this);"> giờ
					</td>
				</tr>								
			<?php } ?>	
			</table>
		</div>
<!-- CAN BO TIEP NHAN -->	
		<div>
			<label><b>Cán bộ tiếp nhận hồ sơ</b></label>
			<div> &nbsp;</div>
		</div>
		<div id="id_receive">
			<input id ="select_receive" name="select_receive" class="textbox" type="checkbox"> <label style="float:right;width:95%;" for="select_receive"><a>Thêm cán bộ tiếp nhận </a></label>				
		</div>
		<div id="ajax_receive">	
			<!-- Ajax Treeview-->		
		</div>
		<div class="line"></div>
<!-- CAN BO TTHU LY -->	
		<div>
			<label><b>Cán bộ thụ lý hồ sơ</b></label>
			<div> &nbsp;</div>
		</div>
		<div id="id_handle">
			<input id ="select_handle" name="select_handle" class="textbox" type="checkbox"> <label style="float:right;width:95%;" for="select_handle"><a>Thêm cán bộ thụ lý</a></label>				
		</div>
		<div id="ajax_handle">	
			<!-- Ajax Treeview-->		
		</div>
		<div id="action_option"><?php echo $this->action_option_html ?></div>
		<div id="clear"></div>
	</div>
</div>			
<!--Hien thi nut!-->			
<table 	width='99%'  border='0' cellspacing='0' cellpadding='0' align="center" class="table_title">		
	<tr>
		<td align="center">	
			<?=$this->formButton("btn_update","Ghi",array("type"=>"button","class"=>"link-button","onClick"=>"btn_save_recordtype(document.getElementsByName('hdn_xml_tag_list'),document.getElementsByName('hdn_xml_value_list'),'');"))?>								
			<?=$this->formButton('btn_back','Quay lại',array("type"=>"button","onClick"=>"actionUrl('../index/');","class"=>"link-button"))?>
		</td>
	</tr>			
</table>
</form>
<script type="text/javascript">
$(document).ready(function() {		
//Jquery Can bo tiep nhan
	$("#ajax_receive").hide();
	$("#select_receive").click(function(){
		$("#ajax_receive").toggle();
		var CheckReceiveStaffval =$("#select_receive").val();
		$.post("../ajaxstaff/",{select_receive: CheckReceiveStaffval},function(data){
			$("#ajax_receive").html(data);
		});
		return true;
	});
	
//Jquery Can bo thu ly
	$("#ajax_handle").hide();
	$("#select_handle").click(function(){
		$("#ajax_handle").toggle();
		var CheckHandleStaffval =$("#select_handle").val();
		$.post("../ajaxstaff/",{select_handle: CheckHandleStaffval},function(data){
			$("#ajax_handle").html(data);
		});
		return true;
	});
});

</script>